package com.ddw.wotcg.client.threejs.objects;

import com.ddw.wotcg.client.threejs.core.Geometry;
import com.ddw.wotcg.client.threejs.core.Object3D;
import com.ddw.wotcg.client.threejs.materials.Material;

/**
 * http://mrdoob.github.com/three.js/docs/54/#Reference/Objects/Mesh
 * 
 * @author fungus1487
 * 
 */
public final class Mesh extends Object3D {
	
	public static native Mesh create(Geometry geometry) /*-{
		return new $wnd.THREE.Mesh(geometry);
	}-*/;
	
	public static native Mesh create(Geometry geometry, Material material) /*-{
		return new $wnd.THREE.Mesh(geometry, material);
	}-*/;
	
	protected Mesh() {
	}
	
	public native Geometry getGeometry() /*-{
		return this.geometry;
	}-*/;
	
	public native Material getMaterial() /*-{
		return this.material;
	}-*/;
	
	public native int getMorphTargetIndexByName(String name) /*-{
		return this.getMorphTargetIndexByName(name);
	}-*/;
	
}
